
#import "UIImage+EmptyImage.h"
#import "UIImage+ImageWithName.h"

@implementation UIImage (EmptyImage)

+ (UIImage *)emptyImageForSize:(CGSize)size {
    int width = MAX(size.width, size.height);
    width = ceil(width/20.0) * 20;
    
    UIImage *img = [UIImage imageWithName:[NSString stringWithFormat:@"no_picture_%dx%d", width, width]];
    return img ? img : [UIImage imageWithName:@"no_picture_80x80.png"];
}

@end